package com.home.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.dao.PriceDao;
import com.home.model.Price;
import com.home.service.PriceService;
@Service("priceService")
public class PriceServiceImpl  implements PriceService{
	@Autowired
	private PriceDao<Price,Integer> priceDao;

	public void delete(Price price) {
		this.getPriceDao().delete(price.getId());
	}

	public List<Price> getList() {
		return this.getPriceDao().getAll();
	}

	public void save(Price price) {
		this.getPriceDao().save(price);
	}

	public PriceDao<Price, Integer> getPriceDao() {
		return priceDao;
	}

	public void setPriceDao(PriceDao<Price, Integer> priceDao) {
		this.priceDao = priceDao;
	}

	public Price getPrice(Integer id) {
		// TODO Auto-generated method stub
		return this.getPriceDao().get(id);
	}
	
	
}
